package com.web.exiaodao.remote.service;

import com.web.exiaodao.business.entity.MomentsInteraction;
import com.web.exiaodao.remote.vo.MomentsInteractionVo;
import com.web.webstart.base.service.ApiBaseService;
import com.web.webstart.base.util.result.XaResult;
import com.web.webstart.base.exception.BusinessException;


public interface ApiMomentsInteractionService extends ApiBaseService<MomentsInteractionVo,MomentsInteraction>{
        /**
        * 查询最新一条满足条件的实体信息
        * @throws BusinessException
        */
        public XaResult<MomentsInteractionVo>  findLastOne() throws BusinessException;

        /**
         * 取消点赞
         * @param userId
         * @param momentId
         * @return
         */
        public XaResult<Boolean> cancelLike(String userId,Long momentId);

        /**
         * 是否已经点赞
         * @param userId
         * @param momentId
         * @return
         */
        public XaResult<Boolean> isLike(String userId,Long momentId);

        /**
         * 删除评论
         * @param modelIds
         * @param status
         * @param userId
         * @return
         */
        public XaResult<MomentsInteractionVo> deleteMomentInteraction(String modelIds,
                                                                      Integer status, String userId);
}
